/**
 * @author Huangxin
 *
 */
package SystemManagement;

import java.util.List;

import Const.RC;
import RecordManagement.RM_FileHandle;
import parse.*;

public interface SM_Manager_Interface {
    public RC.rc OpenDb      (String dbName);                // Open database
    public RC.rc CloseDb     ();                                  // Close database
    public RC.rc CreateTable (String relName,                // Create relation
    		                  Attribute_list attr_list, 
                              Attribute_list primary_key, Attribute_list foreign_key, 
                              String foreign_rel, Attribute_list foreign_attr);
    public RC.rc DropTable   (String relName);               // Destroy relation
    public RC.rc CreateIndex (String relName,                // Create index
    		                  String attrName);
    public RC.rc DropIndex   (String relName,                // Destroy index
    		                  String attrName);
    public RC.rc Load        (String relName,                // Load utility
    		                  String fileName);
    public RC.rc Help        ();                                  // Help for database
    public RC.rc Help        (String relName);               // Help for relation
    public RC.rc Print       (String relName);               // Print relation
    public RC.rc Set         (String paramName,              // Set system parameter
    		                  String value);
    
    public RC.rc GetDataAttrInfo(String relName, 
    		                     List<DataAttrInfo> info);
    public RC.rc InsertTuple(Value_list v, TableName table_name);
    
    public RM_FileHandle OpenFile(String fileName);
    public int GetIndexNo(String relName, String attrName);
    public void CloseFile(RM_FileHandle fh);
}
